<template>
  <div>
    <el-page-header @back="()=>{this.$router.go(-1)}" content="在线ps"></el-page-header>
    <iframe :src="imgurl" frameborder="0" style="width: 100%;height: 100vh;border:0"></iframe>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        imgurl: ""
      }
    },
    created() {
      //"${this.$route.query.url}"
      this.$notify.success({
        title: '成功',
        message: '可能需要3-5分钟预加载，网络状态越好加载越快'
      });
      if (this.$route.query.url) {
        this.imgurl = `https://www.photopea.com/#{"files":["${this.$route.query.url}"]}
`
      } else {
        this.imgurl =
          `https://www.photopea.com/#%7B%22files%22:%5B%5D,%22resources%22:%5B%5D,%22environment%22:%7B%22theme%22:1,%22lang%22:%22zh-CN%22,%22vmode%22:0,%22intro%22:true,%22localsave%22:true,%22topt%22:%7B%22t0%22:%5B1,0,0%5D%7D,%22menus%22:%5B%5B1,1,1,%5B0,1,1,1%5D,0,0,1,%5B0,1%5D,1,1,1,1,1%5D,1,1,1,1,1,1,1,1%5D%7D,%22serial_key%22:%2212cd16c8b1586b46%22%7D`
      }
    }
  }
</script>

<style>
</style>
